Socket
Socket
Sign inDemoInstall

unorm

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

unorm

JavaScript Unicode 8.0 Normalization - NFC, NFD, NFKC, NFKD. Read <http://unicode.org/reports/tr15/> UAX #15 Unicode Normalization Forms.


Version published
Maintainers
1
Created

What is unorm?

The 'unorm' npm package provides Unicode normalization forms as specified in Unicode Standard Annex #15. It allows developers to normalize Unicode strings to ensure consistent representation of characters, which is crucial for string comparison, searching, and sorting.

What are unorm's main functionalities?

Normalization to NFC

This feature normalizes a string to the NFC (Normalization Form C) form, which composes characters to their canonical composed form.

const unorm = require('unorm');
const str = '\u1E9B\u0323';
const normalizedStr = unorm.nfc(str);
console.log(normalizedStr);

Normalization to NFD

This feature normalizes a string to the NFD (Normalization Form D) form, which decomposes characters to their canonical decomposed form.

const unorm = require('unorm');
const str = '\u1E9B\u0323';
const normalizedStr = unorm.nfd(str);
console.log(normalizedStr);

Normalization to NFKC

This feature normalizes a string to the NFKC (Normalization Form KC) form, which composes characters to their compatibility composed form.

const unorm = require('unorm');
const str = '\u1E9B\u0323';
const normalizedStr = unorm.nfkc(str);
console.log(normalizedStr);

Normalization to NFKD

This feature normalizes a string to the NFKD (Normalization Form KD) form, which decomposes characters to their compatibility decomposed form.

const unorm = require('unorm');
const str = '\u1E9B\u0323';
const normalizedStr = unorm.nfkd(str);
console.log(normalizedStr);

Other packages similar to unorm

FAQs

Package last updated on 05 Jul 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc